// 全局getters
// 1. state的计算属性
// 2. 快捷访问 使用getters精简对于模块中响应式数据的方法 为了业务文件访问数据方便（拓展）

const getters = {
  sidebar: (state) => state.app.sidebar,
  device: (state) => state.app.device,
  name: (state) => state.user.userInfo.username,
  avatar: (state) => state.user.userInfo.staffPhoto,
  token: (state) => state.user.token,
  userId: (state) => state.user.userInfo.userId,
  routes: (state) => state.permission.routes // 建立权限模块下的快捷访问
}
export default getters
